<template>
  <el-dialog :visible.sync="visible"  :title="$tt('title_task_assgin_record')">
    <ex_header_spiler :title="title" />
    <div v-loading="loading">
      <ex_super_table :model="tableModel" :data="tableData" max-height="500" />
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'detail_task_record',
  data() {
    return {
      visible: false,
      loading: false,


      title: "",


      tableData: [],

    }
  },
  props: {
    tableModel:Array,
  },
  methods: {

    show({ urlConfig, urlDataHandle,title }) {

      this.visible = true
      this.loading = true
      this.title = title
      this.$ajax({
        ...urlConfig,
        method: 'post',
        success: (res) => {
          this.tableData = urlDataHandle ? urlDataHandle(res) : res.data.rows
          this.loading = false
        },
      })
    }

  },
  hide() {
    this.visible = false
  },

}

</script>
